package com.iisi.web;

import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.enterprise.context.Conversation;
import javax.enterprise.context.ConversationScoped;
import javax.inject.Inject;
import javax.inject.Named;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.iisi.api.JoinService;
import com.iisi.domain.JoinDTO;

@Named
@ConversationScoped
public class JoinControoller implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private static final Logger LOG = LoggerFactory
			.getLogger(JoinControoller.class);

	private JoinDTO dto = null;

	@Inject
	private Conversation conversation;

	@Inject
	private transient JoinService JoinService;

	@PostConstruct
	public void afterInit() {
	//	this.conversation.begin();
		LOG.info("JoinControoller...");
		dto = new JoinDTO();

//		this.JoinService.doQuery(dto);
	}

	public String join() {
		LOG.info("join....");
		//this.conversation.end();

		// this.JoinService.apply(dto);
		return "join_result.xhtml";

	}

	public JoinDTO getDto() {
		return dto;
	}

	public void setDto(JoinDTO dto) {
		this.dto = dto;
	}

}
